-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Add clockinfos to mtnclock #4045
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Add clockinfos to mtnclock #4045
Conversation
I did some benchmarking:
So objects are the winner; change incoming |
Sounds good, thanks for splitting them up like that :)
Yes - I think having it in settings would be better, as people are used to navigating to there to configure their clocks (etc), but I don't mind strongly so I'll let you decide, given you've been using the app for a while now. Another point is that the setting code loads every time the clock does, whereas if it were in settings, your clock would be faster to startup.
I suspect it is fixed, I can't find any problems with that kind of stuff in the code |
5a66395 to
07083dc
Compare
|
OK, I've moved the clockinfo config to settings. There's an odd bug though. |
|
Weird - if you edit the messages widget on your device (via the IDE), and change this code to print some logs about those dimensions it's looking at, what do you see? BangleApps/apps/widmessages/widget.js Lines 50 to 54 in b9141d8
|
I'm creating this draft PR to get feedback before I polish things that I shouldn't do in the first place.
The first two commits are fixing the indentation and converting to posix line endings. If you would prefer not to change these things, let me know and I can rebase without them.
This adds up to 3 clockinfos below the date/weather text, shifting the time and date/weather text upwards.
I also moved one of the mountains a bit for background contrast when all 3 clockinfos are present.
Because the clockinfos are not very large, I created a second view for editing them to allow more room for swipes. This view is accessed by tapping, or by long-tapping on the Bangle.js 2 to reduce accidental activation. I guess this view could have been put in the settings screen, but I did it this way for two reasons which I am not certain about and am open to feedback.
App manager: https://chuckwagoncomputing.github.io/BangleApps/
TODO/Known issues:
clockinfosMainseems like pretty dumb data structure design, but I haven't decided on a solution yet. I don't want to just tagdata.rowsbecause I don't want to persist the shown state. How do objects compare to arrays in Espruino in terms of performance?